var context = $("#_currContext").val();
// 获取购物车数量
var getShopCartNum = function() {
	var url = context + "/api/course/getShopCartNum.shtm";
	$.post(url, {
		ranNum : Math.random()
	}, function(data) {
		var result = eval("(" + $.trim(data) + ")");
		if(result.status == 1){
			if(result.result != "" && result.result > 0){
				$("#shopCartNum").attr("href", "http://member.chinaacc.com/sale/product/shoppingCart.shtm");
				$("#shopCartNum").append("<em class='abs'>"+result.result+"</em>");
			}
		}
	});
}

var getUserIcon = function() {
	$.ajax({
		async: false,
		type : "POST",
		data : {
			ranNum : Math.random()
		},
		url : context + "/api/member/getUserIcon.shtm",
		success : function(msg) {
			try {
				var result = $.trim(msg);
				if(result !=""){
					$("#yesLogin img").attr("src", result);
				}
			} catch (e) {
			}
		}
	}); 
}